from django.test import TestCase

# Create your tests here.


# from datetime import datetime
#
# now=datetime.now()
# now=now.date()
# data1='2020-10-07'
# y = datetime.strptime(data1, '%Y-%m-%d').date()
# data2=now-y
# print(y)
# print(now)
# # print(type(now))
# print(data2.days)


str1 = [1, 2, 3, 4, 5, 6, 7, 8]
str2 = "1,2,3,4,5,6,7,8"
# print(str1.split(","))
list1 = list(map(str, str1))
print(list1)
list2 = ['1', '2', '3', '4', '5', '6', '7', '8']
list3 = list(map(int, list2))
print(list3)
print(list(filter(lambda x: x > 4, list(map(int, str2.split(","))))))

from functools import reduce

print(reduce(lambda x, y: x / y, str1))

